import apis from '../../http/apis/apis'
export default {
    namespaced:'tenants',
    state:{
        tenantsData:[],
        data:{
            currentpage:1,
            pagesize:5,
        },
        total:''
    },
    mutations:{
        changeTenantsData(state,data){
            state.tenantsData=data.result
            state.total=data.total
        }
    },
    actions:{
        async getTenants(context,getData){
            const {data} = await apis.tenants.getTenants(getData)
            context.commit('changeTenantsData',data.data)
            console.log(context.state.tenantsData);
        }
    }
}